home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / POLYTOPE.ZIP / testvec.pov < prev    next >
Encoding:
Text File  |  1997-08-01  |  1.4 KB  |  47 lines

  1. /*
  2.  
  3.     POLYTOPE OBJECT INCLUDE FILE v1.0b - example file for arrayget
  4.     Copyright (C) 1997 Thomas Willhalm
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2 of the License, or
  9.     (at your option) any later version.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program; if not, write to the Free Software
  18.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.  
  21. */
  22. #include "colors.inc"
  23.  
  24. camera {
  25.   location <0, 2, 2>
  26.   look_at <0, 1, 0>
  27. }
  28.  
  29. global_settings{ assumed_gamma 1.0 }
  30.  
  31. light_source { <10, 20, 7> color White}
  32.  
  33. plane { y 0 pigment {checker Green, White}}
  34.  
  35. #declare array = "<1,.1,0>,<.9,.35,0>,<.8,.5,0>,<.7,.63,0>,<.6,.7,0>,<.5,.77,0>,<.4,.8,0>,<.3,.83,0>,<.2,.85,0>,<.1,.873,0>,<0,.875,0>"
  36.  
  37. #declare max_pos=11
  38. #declare array_pos=1
  39. #while (array_pos<=max_pos)
  40.     #include "arrayget.inc"
  41.     sphere { float_vector, 0.05
  42.         pigment{color 1-(max_pos-array_pos)/max_pos*<0,1,1>}}
  43.     sphere { float_vector*<-1,1,1>, 0.05
  44.         pigment{color 1-(max_pos-array_pos)/max_pos*<1,1,0>}}
  45.     #declare array_pos = array_pos +1
  46. #end
  47.